﻿namespace OpenComposite.Base.Structures
{
	using System;

	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
	public sealed class RepositoryInformationAttribute : Attribute
	{
		#region Initialization

		// This is a positional argument
		public RepositoryInformationAttribute(int id, string name, string type)
		{
			_repID = id;
			_name = name;
			_typeName = type;
		}

		public RepositoryInformationAttribute(int id, string name, string type, string hash)
		{
			_repID = id;
			_name = name;
			_typeName = type;
			_hash = hash;
		}

		#endregion Initialization

		#region Public Members

		#region Public Properties

		public string Hash
		{
			get { return _hash; }
		}

		public string Name
		{
			get { return _name; }
		}

		public int RepositoryItemID
		{
			get { return _repID; }
		}

		public string TypeName
		{
			get { return _typeName; }
		}

		#endregion Public Properties

		#endregion Public Members

		#region Private Members

		#region Private Fields

		private string _hash = "";
		private string _name = "";
		private int _repID = -1;
		private string _typeName = "";

		#endregion Private Fields

		#endregion Private Members
	}
}